---
import H2 from "./h2.astro"

interface Props {
  title: string
}

const { title } = Astro.props

const words = title.split(" ")
const lastWord = words.pop()
const restOfTitle = words.join(" ")
---

<H2>
  {restOfTitle} {restOfTitle && " "} <span class="text-accent-500">{lastWord}</span>
</H2>
